#define ACPI_PM1A_EVT_BLK_ADDRESS_SPACE_ID ACPI_SYSTEM_IO
#define ACPI_PM1A_EVT_BLK_BIT_WIDTH 0x20
#define ACPI_PM1A_EVT_BLK_BIT_OFFSET 0x00
-//#define ACPI_PM1A_EVT_BLK_ADDRESS 0x000000000000c010
-#define ACPI_PM1A_EVT_BLK_ADDRESS 0x000000000000c040
+#define ACPI_PM1A_EVT_BLK_ADDRESS 0x000000000000c010
//
// PM1B Event Register Block Generic Address Information
static int parallel_io[MAX_PARALLEL_PORTS] = { 0x378, 0x278, 0x3bc };
static int parallel_irq[MAX_PARALLEL_PORTS] = { 7, 7, 7 };
-/* PIIX4 acpi pci configuration space, func 3 */
-extern void pci_piix4_acpi_init(PCIBus *bus, int devfn);
-
#ifdef HAS_AUDIO
static void audio_init (PCIBus *pci_bus)
{
cmos_init(ram_size, boot_device, bs_table, timeoffset);
- if (pci_enabled && usb_enabled) {
- usb_uhci_init(pci_bus, piix3_devfn + 2);
- }
-
/* using PIIX4 acpi model */
if (pci_enabled && acpi_enabled)
- pci_piix4_acpi_init(pci_bus, piix3_devfn + (usb_enabled ? 3 : 2));
+ pci_piix4_acpi_init(pci_bus, piix3_devfn + 2);
+
+ if (pci_enabled && usb_enabled) {
+ usb_uhci_init(pci_bus, piix3_devfn + (acpi_enabled ? 3 : 2));
+ }
#ifndef CONFIG_DM
if (pci_enabled && acpi_enabled) {
register_ioport_read(addr + 8, 4, 4, acpiPm1Timer_readl, d);
}
-/* PIIX4 acpi pci configuration space, func 3 */
+/* PIIX4 acpi pci configuration space, func 2 */
void pci_piix4_acpi_init(PCIBus *bus, int devfn)
{
PCIAcpiState *d;
uint8_t *pci_conf;
- /* register a function devfn of PIIX4 */
+ /* register a function 2 of PIIX4 */
d = (PCIAcpiState *)pci_register_device(
bus, "PIIX4 ACPI", sizeof(PCIAcpiState),
devfn, NULL, NULL);
void piix4_pm_init(PCIBus *bus, int devfn);
void acpi_bios_init(void);
+/* piix4acpi.c */
+extern void pci_piix4_acpi_init(PCIBus *bus, int devfn);
+
/* pc.c */
extern QEMUMachine pc_machine;
extern QEMUMachine isapc_machine;